package Vista;
import java.util.Iterator;
import java.util.List;

import Modelo.*;

public class VistaPooglin {

	private Ventana ventana;
	
	VistaPooglin (Ventana g){

		this.ventana = g;
	}
	
	public synchronized void pintarPooglin (List <Pooglin> pooglins){
		Iterator<Pooglin> miIterador = pooglins.iterator();
       	while (miIterador.hasNext()){
    		Pooglin pooglin = (Pooglin) miIterador.next();
        	if (pooglin!=null){
        		Posicion posicion = pooglin.getPosicion();
        		ventana.getGraphics().drawImage(pooglin.getImagen(),posicion.getPosicionX()*20+5,
        				posicion.getPosicionY()*20+37,15,15,this.ventana);
        		
        	}
       	}
 
	}
}
